uniform sampler2D	textureSampler;
uniform sampler2D	lightbufferDiffuseSampler;
uniform sampler2D	lightbufferSpecularSampler;

uniform vec2 imageSize;

varying vec2 texCoords;

void main()
{

	// lookup texture
	vec3 textureSample	= texture2D(textureSampler, texCoords).rgb;
	
	// lookup diffuse values from light buffer
	vec3 diffuseSample  = texture2D(lightbufferDiffuseSampler, gl_FragCoord.xy / imageSize).rgb;
	
	// lookup specular values from light buffer
	vec3 specularSample = texture2D(lightbufferSpecularSampler, gl_FragCoord.xy / imageSize).rgb;
	
	vec3 color			= (0.4 * diffuseSample + 0.2) * textureSample + 0.4 * specularSample;

	// compute final color
	gl_FragColor = vec4( color, 1.0 );


}